<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "hy_support".
 *
 * @property string $id
 * @property string $res_id 资源编号
 * @property int $res_type 资源类型 1图书，2期刊，3图片,4音频 5视频
 * @property string $res_title 题名
 * @property int $sup_type 1首页  2推荐
 * @property int $br_id 分馆id
 * @property string $created_at
 * @property string $updated_at
 * @property string $deleted_at
 */
class HySupport extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'hy_support';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['res_type', 'sup_type', 'br_id'], 'integer'],
            [['created_at', 'updated_at', 'deleted_at'], 'safe'],
            [['res_id', 'res_title'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'res_id' => '资源编号',
            'res_type' => '资源类型',
            'res_title' => '资源名称',
            'sup_type' => '推荐位置',
            'br_id' => '分馆id',
            'created_at' => '添加时间',
            'updated_at' => 'Updated At',
            'deleted_at' => 'Deleted At',
        ];
    }
}
